package org.millioncall.yueyoga.admin.model.base;

import java.util.Date;
import java.util.List;

import org.millioncall.yueyoga.admin.model.UserDetail;

//created by zangjy on 2012-4-4
public abstract class BaseUserDetail implements java.io.Serializable {
	private static final long serialVersionUID = 6228924744145898070L;
	private String id;
	private String name;
	private String sex = "男";
	private Date birthday;
	private String homeAddress;
	private String workAddress;
	private String cardId;// 身份证号
	private String phone;
	private String mobile;
	private String messageMail;
	private String msn;
	private String qq;
	private String job;
	private String trade;// 从事行业
	private List<String> interest;// 兴趣，爱好，圈子
	private String contact;
	private int prestige = 0;// 威望
	private int credit = 0;// 信用
	private String description;// 描述

	private int hashCode = Integer.MIN_VALUE;

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
		this.hashCode = Integer.MIN_VALUE;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getSex() {
		return sex;
	}

	public void setSex(String sex) {
		this.sex = sex;
	}

	public Date getBirthday() {
		return birthday;
	}

	public void setBirthday(Date birthday) {
		this.birthday = birthday;
	}

	public String getHomeAddress() {
		return homeAddress;
	}

	public void setHomeAddress(String homeAddress) {
		this.homeAddress = homeAddress;
	}

	public String getWorkAddress() {
		return workAddress;
	}

	public void setWorkAddress(String workAddress) {
		this.workAddress = workAddress;
	}

	public String getCardId() {
		return cardId;
	}

	public void setCardId(String cardId) {
		this.cardId = cardId;
	}

	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	public String getMobile() {
		return mobile;
	}

	public void setMobile(String mobile) {
		this.mobile = mobile;
	}

	public String getMessageMail() {
		return messageMail;
	}

	public void setMessageMail(String messageMail) {
		this.messageMail = messageMail;
	}

	public String getMsn() {
		return msn;
	}

	public void setMsn(String msn) {
		this.msn = msn;
	}

	public String getQq() {
		return qq;
	}

	public void setQq(String qq) {
		this.qq = qq;
	}

	public String getJob() {
		return job;
	}

	public void setJob(String job) {
		this.job = job;
	}

	public String getTrade() {
		return trade;
	}

	public void setTrade(String trade) {
		this.trade = trade;
	}

	public List<String> getInterest() {
		return interest;
	}

	public void setInterest(List<String> interest) {
		this.interest = interest;
	}

	public String getContact() {
		return contact;
	}

	public void setContact(String contact) {
		this.contact = contact;
	}

	public int getPrestige() {
		return prestige;
	}

	public void setPrestige(int prestige) {
		this.prestige = prestige;
	}

	public int getCredit() {
		return credit;
	}

	public void setCredit(int credit) {
		this.credit = credit;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public boolean equals(Object obj) {
		if(obj == null) {
			return false;
		}
		if(!(obj instanceof UserDetail)) {
			return false;
		} else {
			UserDetail userdetail = (UserDetail)obj;
			if(this.getId() == null || userdetail.getId() == null) {
				return false;
			} else {
				return (this.getId().equals(userdetail.getId()));
			}

		}
	}

	public int hashCode() {
		if(this.hashCode == Integer.MIN_VALUE) {
			if(this.getId() == null) {
				return super.hashCode();
			} else {
				String hashStr = this.getClass().getName() + ":" + this.getId().hashCode();
				this.hashCode = hashStr.hashCode();
			}
		}
		return this.hashCode;
	}
}
